cmake_minimum_required(VERSION 3.10)

project(ServerUI)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-g -Wall -Xlinker -export-dynamic")

aux_source_directory(MonitorUI MONITOR_UI_SRC)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(sdbus-c++ REQUIRED)
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-4.0)
pkg_check_modules(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0
                  gstreamer-video-1.0 gstreamer-app-1.0)

link_libraries(
  PkgConfig::GTKMM
  PkgConfig::gstreamer
  fmt
  rt
  yaml-cpp
  pthread
  SDBusCpp::sdbus-c++)

include_directories(../include)

add_executable(MonitorUI_test MonitorUI/UILoader.cpp test/MonitorUI_test.cpp)

add_executable(GLImage_test MonitorUI/GLImage.cpp test/GLImage_test.cpp)

add_executable(sdbusServer_test MonitorUI/sdbusServer.cpp
                                test/sdbusServer_test.cpp)

add_executable(MonitorUI ${MONITOR_UI_SRC} run/Monitor.cpp)
